<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Medium
  </div>
  <div>
   <h1 class="question_title">
    560. Subarray Sum Equals K
   </h1>
   <p>
    Given an array of integers and an integer
    <b>
     k
    </b>
    , you need to find the total number of continuous subarrays whose sum equals to
    <b>
     k
    </b>
    .
   </p>
   <p>
    <b>
     Example 1:
    </b>
    <br>
   </p>
   <pre>
<b>Input:</b>nums = [1,1,1], k = 2
<b>Output:</b> 2
</pre>
   <p>
    <b>
     Note:
    </b>
    <br>
   </p>
   <ol>
    <li>
     The length of the array is in range [1, 20,000].
    </li>
    <li>
     The range of numbers in the array is [-1000, 1000] and the range of the integer
     <b>
      k
     </b>
     is [-1e7, 1e7].
    </li>
   </ol>
  </div>
  <div>
   <h1 class="question_title">
    560. 和为K的子数组
   </h1>
   <p>
    给定一个整数数组和一个整数&nbsp;
    <strong>
     k，
    </strong>
    你需要找到该数组中和为&nbsp;
    <strong>
     k&nbsp;
    </strong>
    的连续的子数组的个数。
   </p>
   <p>
    <strong>
     示例 1 :
    </strong>
   </p>
   <pre>
<strong>输入:</strong>nums = [1,1,1], k = 2
<strong>输出:</strong> 2 , [1,1] 与 [1,1] 为两种不同的情况。
</pre>
   <p>
    <strong>
     说明 :
    </strong>
   </p>
   <ol>
    <li>
     数组的长度为 [1, 20,000]。
    </li>
    <li>
     数组中元素的范围是 [-1000, 1000] ，且整数&nbsp;
     <strong>
      k&nbsp;
     </strong>
     的范围是&nbsp;[-1e7, 1e7]。
    </li>
   </ol>
  </div>
 </body>
</html>